#pragma once

#include "ImgProCfg.h"
#include "xkImgAnalyBit.h"

#include "..\..\src2\DDPublic\DDirectDisplay.h"


#include "xkImgAnalyBit16.h"
#include "xkImgAnalyBit8.h"

class xhImageAnaly
{
public:
	xhImageAnaly(void);
	~xhImageAnaly(void);

public:
	//init
	int Initialize();
	//set parent hwnd
	int SetHwnd(HWND hWnd = NULL);

public:
	//standard iamge
	int LoadStdFile(char *pFileName);
	//
	int SetStdImgBuffer(zkImgBitInfo *pImgInfo);
	//
	int StdImgOperate(DWORD dwAnalyType,void *pVoid = NULL);

public:
	//To be Checked image
	int SetChkImgBuffer(zkImgBitInfo *pImgInfo);
	//
	int ChkImgOperate(DWORD dwAnalyType,void *pVoid = NULL);


public:
	int ImgAnaly();

public:
	int	Draw(void *pVoid = NULL);
	int ImageCtrl(DWORD dwType,void *pVoid = NULL);


private:
	void DefaultDisplayPalette(zkImgBitInfo *pImgInfo);
	int  LoadDataToDisp();


private:
	xkImgAnalyBit16 m_xImgAnalyBit16;
	xkImgAnalyBit8  m_xImgAnalyBit8;

private:
	xkImgAnalyBit    *m_pImgBit;
	HWND              m_hWnd;
	DDCriticalSection m_Lock;

private:
	DDirectDisplay m_xDisp;



};
